qx.Class.define("bip.ui.categories.CategoryForm",
{
  extend : qx.ui.form.Form,
  
  construct : function()
  {
    this.base(arguments);
    // Add fields
    var nameTextfield = new qx.ui.form.TextField();
    nameTextfield.setRequired(true);
    nameTextfield.setWidth(200);
    this.add(nameTextfield, "Name", null, "name");
    var descTextfield = new qx.ui.form.TextField();
    descTextfield.setRequired(true);
    this.add(descTextfield, "Description", null, "description");
    var minValueField = new qx.ui.form.Spinner();
    minValueField.set({maximum: 100,minimum: -100});
    //minValueField.setRequired(true);
    this.add(minValueField, "MinValue", null, "minvalue");
    var maxValueField = new qx.ui.form.Spinner();
    maxValueField.set({maximum: 100,minimum: -100});
    //maxValueField.setRequired(true);
    this.add(maxValueField, "MaxValue", null, "maxvalue");
	
    // buttons
    this.__saveButton = new qx.ui.form.Button("Save");
    this.__saveButton.setWidth(70);
    this.addButton(this.__saveButton);
    this.__cancelButton = new qx.ui.form.Button("Cancel");
    this.__cancelButton.setWidth(70);
    this.addButton(this.__cancelButton);
  },
  
	/*
	 *****************************************************************************
    MEMBERS
	 *****************************************************************************
	 */

 	members :
 	{
 		__saveButton: null,
 		__cancelButton: null,
 		
 		getSaveButton: function() {
 			return this.__saveButton
 		},
 		
 		getCancelButton: function() {
 			return this.__cancelButton
 		}
 		
 	},
 	
	/*
	 * ****************************************************************************
	 * DESTRUCTOR
	 * ****************************************************************************
	 */

	destruct : function() {
		this._disposeObjects();
		this.__saveButton.dispose();
		this.__saveButton = null;
		this.__cancelButton.dispose();
		this.__cancelButton = null;
	}

  
});